1. Field of the Invention
This invention relates to memory management systems.
2. Description of the Related Art
Some electronic apparatuses have memory devices such semiconductor memory or magnetic disc, and the electronic apparatuses are technically required to efficiently manage memories. A memory is allocated as a required area when necessary, and released after finishing using the memory to re-use it. Repeatedly performing such allocation and release of memories results in fragmentation, that is, a state where available memory areas separately exist in an address space, and consequently, a large continuous memory area can not be allocated even though the memory usage rate is still low.
In ordinary techniques, data processing apparatuses such as image forming apparatus use some memory management methods as follows in order to tend not to result in fragmentation and not to cause decline of throughput due to waiting for free area in a memory, transferring data within a memory and so on. In a method, if a page detection processing unit detects the beginning of a page, then a memory resource allocation unit allocates a memory; and then the memory is divided into partitions, and memory areas for input data and processed data are allocated in the partitions. While a data processing unit generates the processed data and stores it in a memory area for the processed data, the memory resource release unit releases unnecessary memory areas. The released unnecessary memory areas will be a part of free areas in the partition specified for the processed data.
In another method, to provide a host device capable of writing at high speed, a management system allocates unit blocks in a memory area in turn to obtain a writing area for storing writing data, and sets a management block as some natural number of the allocates unit blocks, and allocates the management block as the writing area for a writing function call with regard to a writing speed of the management block; and then a controller provides an instruction to a memory card to write data in the unit blocks allocated by the management system.